(function (line) {
    line.define('line.Element', line.ObservableObject, {
        events:[],
        properties:{
            'class':{
                getter:function (owner) {
                    return owner.getAttribute('class');
                },
                setter:function (owner, value) {
                    owner.setAttribute('class', value);
                }
            },
            id:{
                getter:function (owner) {
                    return owner.getAttribute('id');
                },
                setter:function (owner, value) {
                    owner.setAttribute('id', value);
                }
            },
            style:{
                getter:function (owner) {
                    return owner.getAttribute('style');
                },
                setter:function (owner, value) {
                    owner.setAttribute('style', value);
                }
            },
            title:{
                getter:function (owner) {
                    return owner.getAttribute('title');
                },
                setter:function (owner, value) {
                    owner.setAttribute('title', value);
                }
            },
            dir:{
                getter:function (owner) {
                    return owner.getAttribute('dir');
                },
                setter:function (owner, value) {
                    owner.setAttribute('dir', value);
                }
            },
            lang:{
                getter:function (owner) {
                    return owner.getAttribute('lang');
                },
                setter:function (owner, value) {
                    owner.setAttribute('lang', value);
                }
            },
            tabindex:{
                getter:function (owner) {
                    return owner.getAttribute('tabindex');
                },
                setter:function (owner, value) {
                    owner.setAttribute('tabindex', value);
                }
            },
            text:{
                getter:function (owner) {
                    return owner.element.innerText;
                },
                setter:function (owner, value) {
                    owner.element.innerText = value;
                }
            }
        },
        methods:{
            init:function (el) {
                this.inherited();
                this.element = el;
            },
            getAttribute:function (name) {
                return this.element.getAttribute(name);
            },
            setAttribute:function (name, value) {
                this.element.setAttribute(name, value);
            }
        }
    });

    line.define('line.InputElement', line.Element, {
        properties:{
            value:{
                getter:function (owner) {
                    return owner.element.value;
                },
                setter:function (owner, value) {
                    owner.element.value = value;
                }
            }
        },
        methods:{
            init:function (el) {
                this.inherited(el);
                var self = this;
                el.oninput = function () {
                    var value = self.prop('value');
                    self.notifyPropertyChanged('value', value);
                };
            }
        }
    });
})(line);